package com.internal.fileDataModel;

import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

public class Node {

	private Path path;
	private List<Node> parent;
	private int hasCode;
	
	public Node(){}
	
	public Node (Path path){
		this.path = path;
		hasCode = path.hashCode();
	}
	
	public List<Node> getParent() {
		if(parent == null)
		{
			parent = new ArrayList<Node>();
			return parent;
		}
		else return parent;
	}
	
	public void setParent(List<Node> parent) {
		this.parent = parent;
	}
	
	public int getSize(){
		return parent.size();
	}
	
	
	public String toString(){
		
		return path.getFileName().toString();
	}

	public Path getPath() {
		return path.getFileName();
	}

	public void setPath(Path path) {
		this.path = path;
	}

	public int getHasCode() {
		return hasCode;
	}

	public void setHasCode(int hasCode) {
		this.hasCode = hasCode;
	}
	
	
}
